<template>
  <div id="app">
    <router-view :key="key" />
    <!-- <theme-picker /> -->
  </div>
</template>

<script>
import ThemePicker from "@/components/ThemePicker";
import { ddAuthCode, getAccessToken } from "@/utils/dingTalk";
export default {
  name: "App",
  components: { ThemePicker },
  data() {
    return {
      loading: null,
    };
  },
  computed: {
    key() {
      return this.$route.query.t;
    },
  },
  metaInfo() {
    return {
      title:
        this.$store.state.settings.dynamicTitle &&
        this.$store.state.settings.title,
      titleTemplate: (title) => {
        return title
          ? `${title} - ${process.env.VUE_APP_TITLE}`
          : process.env.VUE_APP_TITLE;
      },
    };
  },
  mounted() {
    // getAccessToken();
    window.showLoading = () => {
      this.loading = this.$loading({
        lock: true,
        text: "Loading",
        spinner: "el-icon-loading",
        background: "rgba(0, 0, 0, 0.7)",
      });
    };
    window.closeLoading = () => {
      this.loading.close();
    };
  },
};
</script>
<style lang="scss">
::v-deep .row {
  div {
    width: 100%;
    text-align: left;
  }
}
.out-border {
  border: 1px solid #ddd !important;
  padding: 10px 20px 0;
}
.mr10 {
  margin-right: 10px;
}
.break-wrap {
  white-space: pre-wrap;
}
.el-avatar > img{
  width: 100%;
}
/* 为所有滚动条设置样式 */
*::-webkit-scrollbar {
  width: 8px; /* 设置滚动条的宽度 */
  height: 8px; /* 设置滚动条的高度 */
}

/* 滚动条轨道 */
*::-webkit-scrollbar-track {
  background: #f1f1f1; /* 设置轨道的背景颜色 */
}

/* 滚动条的滑块 */
*::-webkit-scrollbar-thumb {
  background: #888; /* 设置滑块的背景颜色 */
}

/* 当鼠标悬停在滑块上 */
*::-webkit-scrollbar-thumb:hover {
  background: #555; /* 设置滑块在悬停状态下的背景颜色 */
}
</style>
